package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the TITU_SUSPEN database table.
 * 
 */
@Entity
@Table(name="TITU_SUSPEN")
public class TituSuspen implements Serializable {
	private static final long serialVersionUID = 1L;
	private TituSuspenPK id;
	private String agntSync;
	private String anoTitu;
	private String estado;
	private String numTitu;
	private Date tsUltSync;
	private Titulo titulo;

    public TituSuspen() {
    }


	@EmbeddedId
	public TituSuspenPK getId() {
		return this.id;
	}

	public void setId(TituSuspenPK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(name="ANO_TITU", nullable=false, length=4)
	public String getAnoTitu() {
		return this.anoTitu;
	}

	public void setAnoTitu(String anoTitu) {
		this.anoTitu = anoTitu;
	}


	@Column(length=1)
	public String getEstado() {
		return this.estado;
	}

	public void setEstado(String estado) {
		this.estado = estado;
	}


	@Column(name="NUM_TITU", nullable=false, length=8)
	public String getNumTitu() {
		return this.numTitu;
	}

	public void setNumTitu(String numTitu) {
		this.numTitu = numTitu;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to Titulo
    @ManyToOne
	@JoinColumn(name="REFNUM_TITU", nullable=false, insertable=false, updatable=false)
	public Titulo getTitulo() {
		return this.titulo;
	}

	public void setTitulo(Titulo titulo) {
		this.titulo = titulo;
	}
	
}